package com.zcxx.cotton.sale.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zcxx.cotton.sale.mapper.SaleInfoMapper;
import com.zcxx.cotton.sale.domain.SaleInfo;
import com.zcxx.cotton.sale.service.ISaleInfoService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2025-07-26
 */
@Service
public class SaleInfoServiceImpl extends ServiceImpl<SaleInfoMapper,SaleInfo> implements ISaleInfoService
{
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SaleInfoMapper saleInfoMapper;


    @Override
    public List<SaleInfo> selectSaleinfosList(SaleInfo saleInfo) {
        List<SaleInfo> list=saleInfoMapper.selectSaleinfosList(saleInfo);
        return list;
    }
    /**
     * 查询【请填写功能名称】
     *
     * @param saleinfosId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public SaleInfo selectSaleInfoBySaleinfosId(Long saleinfosId)
    {
        return saleInfoMapper.selectSaleInfoBySaleinfosId(saleinfosId);
    }


    /**
     * 新增【请填写功能名称】
     *
     * @param saleInfo 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertSaleInfo(SaleInfo saleInfo)
    {
        saleInfo.setCreateTime(DateUtils.getTime());
        return saleInfoMapper.insertSaleInfo(saleInfo);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param saleInfo 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateSaleInfo(SaleInfo saleInfo)
    {
        return saleInfoMapper.updateSaleInfo(saleInfo);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param saleinfosIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteSaleInfoBySaleinfosIds(Long[] saleinfosIds)
    {
        return saleInfoMapper.deleteSaleInfoBySaleinfosIds(saleinfosIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param saleinfosId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteSaleInfoBySaleinfosId(Long saleinfosId)
    {
        return saleInfoMapper.deleteSaleInfoBySaleinfosId(saleinfosId);
    }
}
